//
//  FFTabBarViewController.swift
//  KCSwift
//
//  Created by apple on 2023/7/21.
//

import UIKit

class FFTabBarViewController: UITabBarController {

    var homeVC = HomeViewController()
    var secVC = SecViewController()
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.setNavigationBarHidden(true, animated: true)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        let item1 = UITabBarItem.init(title: "home", image: UIImage.init(named: "tabBar_home_nor"), selectedImage: UIImage.init(named: "tabBar_home_sel"))
        let item2 = UITabBarItem.init(title: "sel", image: UIImage.init(named: "tabBar_main_nor"), selectedImage: UIImage.init(named: "tabBar_main_sel"))
        homeVC.tabBarItem = item1;
        secVC.tabBarItem = item2
        
        tabBar.tintColor = UIColor.yellow
        tabBar.unselectedItemTintColor = UIColor.gray
        
        let arr = [homeVC,secVC]
        
        setViewControllers(arr, animated: true)
        
    }


    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
